package com.ktwlsoft.archivemanage.domain.business.repositoryService;

import com.ktwlsoft.archivemanage.domain.dao.entity.UnitArchives;
import com.ktwlsoft.archivemanage.domain.dao.repository.IUnitArchivesMapper;
import com.ktwlsoft.archivemanage.payload.Result;
import com.ktwlsoft.archivemanage.payload.ResultType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @description 室藏档案数据层服务类
 * @author chenkun
 * @version 1.0
 * @date 2019-10-29
 */
@Service
public class UnitArchivesRepositoryService {
    @Autowired
    private IUnitArchivesMapper iUnitArchivesMapper;

    /**
     * @description 查询室藏档案列表
     * @param data
     * @return List<Map<String,Object>>
     */
    public List<Map<String,Object>> findUnitArchivesList(Map<String,Object> data){
        List<Map<String,Object>> list=iUnitArchivesMapper.findUnitArchivesList(data);
        return list;
    }

    /**
     * @description 查询室藏档案信息
     * @param businessId 业务编号
     * @return List
     */
    public List findUnitArchivesInfo(Long businessId){
        return iUnitArchivesMapper.findUnitArchivesInfo(businessId);
    }
    /**
     * @description 添加室藏档案信息
     * @param unitArchives
     * @return Result
     */
    public int addUnitArchives(UnitArchives unitArchives){
        return iUnitArchivesMapper.addUnitArchives(unitArchives);
    }

    /**
     * 删除室藏档案
     * @param archiveId
     * @return int
     */
    public int deleteUnitArchives(Long archiveId){
        return iUnitArchivesMapper.deleteUnitArchives(archiveId);
    }

    /**
     * 更新室藏档案
     * @param unitArchives
     * @return int
     */
    public int updateUnitArchives(UnitArchives unitArchives){
        return iUnitArchivesMapper.updateUnitArchives(unitArchives);
    }

    /**
     * 更新室藏档案
     * @param unitArchives
     * @return int
     */
    public int updateUnitArchivesInfo(UnitArchives unitArchives){
        return iUnitArchivesMapper.updateUnitArchivesInfo(unitArchives);
    }

    /**
     * 查询列表 on 2019-10-24 14:19:44
     * @param unitArchives unitArchives
     * @return List<UnitArchives>
     */
    public List<UnitArchives> findList(UnitArchives unitArchives){
        return iUnitArchivesMapper.findList(unitArchives);
    }
}
